package com.chuangjiangx.member.score.ddd.dal.mapper;

import com.chuangjiangx.member.score.ddd.dal.condition.QueryScoreGiftRuleCondition;
import com.chuangjiangx.member.score.ddd.query.dto.GiftsListDTO;
import com.chuangjiangx.member.score.ddd.query.dto.GiftsListForH5DTO;
import com.chuangjiangx.member.score.ddd.dal.dto.MemberScoreGiftRuleList;
import com.chuangjiangx.member.stored.ddd.dal.dto.RuleName;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ScoreGiftDalMapper {

    List<RuleName> queryAllRuleName();

    /**
     * APP获取商品列表
     */
    List<GiftsListDTO> queryGiftsList(@Param("merchantId") Long merchantId);

    /**
     * H5获取商品列表
     */
    List<GiftsListForH5DTO> queryGiftsListForH5(@Param("merchantId") Long merchantId);

    /**
     * 查询商品兑换次数
     *
     * @param scoreGiftId 商品id
     * @return
     */
    int searchConvertCount(@Param("scoreGiftId") Long scoreGiftId);


    int countMbrScoreGiftRuleList(QueryScoreGiftRuleCondition condition);


    List<MemberScoreGiftRuleList> findMbrScoreGiftRuleList(QueryScoreGiftRuleCondition condition);


}
